Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(radio-button): add a bit of padding to radio button example #7433

Merged
merged 3 commits into from
Oct 5, 2017

Conversation

alyssamichelle
Copy link
Contributor

A spoonful of padding helps the radio-buttons go down! ☂️

Before:
image
image

After:
image
image

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 30, 2017
@@ -1 +1,4 @@
/** No CSS for this example */
.mat-radio-button:not(:last-child) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a little more robust as:

.mat-radio-button + .mat-radio-button {
  margin-left: 16px;
}

Also the comment isn't really necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crisbeto I think the way I did it allows for more flexibility. If someone has an element other than a .mat-radio-button as a sibling, then I think yours breaks down; whereas with my way, you could have a radio button, some other element, and then another radio button and mine would still put a bit of space.

That being said, I think your way might be faster. What do you think about doing .mat-radio-button ~ .mat-radio-button? Using this should allow us to select all the radio button siblings, no matter if they are immediately adjacent or not and would still be a little faster than :not().

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works as well. My only issue with the first approach was it could've broken if we shuffled the DOM around.

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crisbeto crisbeto added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Oct 1, 2017
Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kara kara added pr: needs review and removed action: merge The PR is ready for merge by the caretaker labels Oct 2, 2017
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Oct 4, 2017
@kara kara merged commit ff52d95 into angular:master Oct 5, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants